package com.ruoyi.project.museums.service.impl;

import com.ruoyi.project.museums.domain.Message;
import com.ruoyi.project.museums.mapper.MessageMapper;
import com.ruoyi.project.museums.service.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageServiceImpl implements IMessageService {

    @Autowired
    private MessageMapper messageMapper;

    /**
     * 查询留言列表
     *
     * @param message 留言
     * @return 留言集合
     */
    public List<Message> selectMessageList(Message message) {
        return  messageMapper.selectMessageList(message);
    }

    /**
     * 新增留言
     *
     * @param message 留言
     * @return 结果
     */
    public int insertMessage(Message message) {
        return  messageMapper.insertMessage(message);
    }
}
